﻿using System;
using DCS.Domain.Entities;
using Dcs.Infrastructure;

namespace RepositoryTests
{
    public class Program
    {
        static void Main(string[] args)
        {
            var repository = new Repository(
                "Data Source=KIRILL-LAPTOP\\SQLEXPRESS;Initial Catalog=DCS;Integrated Security=False; User ID=sa; Password=spt01");
            for (int i = 0; i < 1000; i++)
            {
                var computationalClient = new ComputationalClient
                                              {Id = Guid.NewGuid(), CoreCount = DateTime.Now.Millisecond};
                repository.Save(computationalClient);
            }

            Console.WriteLine("Clients: " + repository.GetClients().Count);
        }
    }
}
